<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .parent p{
            background-color: red;
        }
        .parent>p{
            background-color: blue;
            color: white;
        }
        *{
            margin: 0;
            padding: 0;
        }
    </style>
</head>
<body>
    <div class="parent">
        <p>段落标签</p>
        <p>段落标签</p>
        <p>段落标签</p>
        <p>段落标签</p>
        <p>段落标签</p>
        <div>
        <p>段落标签</p>
        <p>段落标签</p>
        <p>段落标签</p>
        <p>段落标签</p>
        <p>段落标签</p>
        </div>
    </div>
        
</body>
</html>